package com.baomidou.mybatisplus.samples.tenant.service;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.samples.tenant.annonation.IgnoreTenant;
import com.baomidou.mybatisplus.samples.tenant.entity.User;
import com.baomidou.mybatisplus.samples.tenant.mapper.UserMapper;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @Auther: 乔帅 ymxz34787409@126.com
 * @Date: 2022/2/19 11:06
 */
@Service
public class UserService extends ServiceImpl<UserMapper, User> implements IUserService {

    // 忽略租户拦截器
    @Override
    @IgnoreTenant
    public List<User> listIgnoreTenant() {
        return baseMapper.selectList(Wrappers.emptyWrapper());
    }

    @Override
    public List<User> listAll() {
        return baseMapper.selectList(Wrappers.emptyWrapper());
    }

}
